package com.hopu.v1.service.admin.verify.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hopu.v1.pojo.common.PageData;
import com.hopu.v1.pojo.verify.StudentLeaveApplications;
import com.hopu.v1.service.admin.verify.VerifyStudentLeaveApplicationsService;
import com.hopu.v1.mapper.admin.verify.VerifyStudentLeaveApplicationsMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class VerifyStudentLeaveApplicationsServiceImpl extends ServiceImpl<VerifyStudentLeaveApplicationsMapper, StudentLeaveApplications>
    implements VerifyStudentLeaveApplicationsService {

    @Resource
    private VerifyStudentLeaveApplicationsMapper verifyStudentLeaveApplicationsMapper;



    @Override
    public PageData<StudentLeaveApplications> selectLeaveList(Integer staffId1, Integer pages, Integer size) {
        List<StudentLeaveApplications> studentLeaveApplications = verifyStudentLeaveApplicationsMapper.selectLeaveList(staffId1, (pages-1)*size, size);
        Integer total = verifyStudentLeaveApplicationsMapper.selectLeaveCount(staffId1);
        return new PageData<>( pages,size, total, studentLeaveApplications);
    }
}




